#include "api_include.h"

hard_t g_hard;

void api_hard_init(void)
{
	memset(&g_hard, 0, sizeof(g_hard));
}

void api_hard_read(void)
{	
	g_hard.key1 = IO_KEY_GET(IO_KEY1_PORT, IO_KEY1_PIN);
	g_hard.key2 = IO_KEY_GET(IO_KEY2_PORT, IO_KEY2_PIN);
	g_hard.key3 = IO_KEY_GET(IO_KEY3_PORT, IO_KEY3_PIN);
	g_hard.key4 = IO_KEY_GET(IO_KEY4_PORT, IO_KEY4_PIN);
	g_hard.key5 = IO_KEY_GET(IO_KEY5_PORT, IO_KEY5_PIN);
}

void api_hard_load(void)
{
	MCU_LED(g_hard.mcu_led);		/* LED控制 */
	BEEP(g_hard.beep);
//	SINGLE_LED(g_hard.single_led);
	RELAY(g_hard.relay);
}
